<div class="page_gpon">
    <div class="hide">
        <img ng-src="{{setlogo}}" alt="logo">
    </div>
    <header class="navbar navbar-inverse container-fuild">
        <div class="col-xs-6 text-center blk" ng-class="{active: state=='mygpon'}" ng-click="changemygpon()">
            <p class="icon-ss-user"></p>

            <p>我的团</p>
        </div>
        <div class="col-xs-6 text-center blk" ng-class="{active: state=='hotgpon'}" ng-click="changehotgpon()">
            <p class="icon-ss-useradd"></p>

            <p>加入热团</p>
        </div>
    </header>
    <article>
        <section class="gohome" ng-if="state == 'home'">
            <button class="btn btn-info" ui-sref="home">首页 ＞＞</button>
        </section>
        <section class="carousel" ng-if="state == 'home'">
            <img ng-src="{{setpic[0].src}}" style="margin:auto;">
        </section>
		<section ng-if="setinfo.set_id == 3">
			<section>
				<img src="http://img-idm.shishifresh.com/Public/uploadFiles/2016-03-12/58eb6203bbbe3e6563ab3c1bebd0c396.jpg">
			</section>
		</section>
		<section ng-if="setinfo.set_id == 4">
			<section>
				<img src="http://img-idm.shishifresh.com/Public/uploadFiles/2016-03-14/7f91bcf593675de6deb196a146d36eac.jpg">
			</section>
		</section>
        <section class="info container-fuild" ng-if="state == 'home'">
            <div class="row">
                <p class="name text-center">
                    {{cominfo.name}}
                </p>

                <div class="countdown pull-right text-center">
                    <small>距离团购截止</small>
                    <br/>
                    <strong ng-bind="countdowntime"></strong>
                </div>
            </div>
            <div class="row">
                <p class="col-xs-5 text-center welfare" ng-if="extinfo.hit_price == -1">
                    <span>尚未成团</span>
                </p>

                <p class="col-xs-5 text-center welfare" ng-if="extinfo.hit_price > -1">
                    <span>当前价：<strong ng-bind="extinfo.hit_price"></strong>元</span>
                </p>

                <p class="col-xs-7 text-left welfare">
                    <span>组团成功团长额外优惠5元</span>
                </p>


            </div>
            <div class="row detail">
				<div ng-if="cominfo.origin != ''">
                <p class="col-xs-3 text-left">产地:</p>

                <p class="col-xs-3 text-left" ng-bind="cominfo.origin"></p>
				</div>
                <p class="col-xs-3 text-left">规格:</p>

                <p class="text-left" ng-bind="cominfo.spec"></p>

                <p class="col-xs-3 text-left">配送时间:</p>

                <p class="col-xs-3 text-left" ng-bind="setinfo.sale_cycle.dispatch_datetime"></p>
            </div>
            <div class="go" ui-sref="detail({cid:setinfo.commodity_id,former:'gpon'})">
                <p>商品详情（建议在WIFI下浏览）<span class="icon-ss-right"></span></p>
            </div>
            <div class="row text-center goal">
                满{{setinfo.people_limit}}人参团{{extinfo.groupon_price}}元
            </div>
        </section>
        <section class="list container mygpon" ng-if="state == 'mygpon'">
            <div class="boundary row" ng-if="buttons != null  && buttons != undefined">
                <hr color="#eb5934" size="1">
                <div class="text-center middle">
                    <div class="title center-block">新的团</div>
                </div>
            </div>
            <div class="btngroup container-fuild text-center buttons">
                <a class="btn btn-info" ng-repeat="button in buttons" ng-click="GoBuild(button.set_id)">建一个{{button.set_alias}}</a>
            </div>
            <div class="boundary row">
                <hr color="#eb5934" size="1">
                <div class="text-center middle">
                    <div class="title center-block">我的团</div>
                </div>
            </div>
            <h4 class="text-center text-info" ng-show="mygponlist == null">暂无</h4>

            <div class="onegpon container" ng-repeat="one in mygponlist">
                <p class="row">
                    <span class="col-xs-2 portrait text-center"><img ng-src="{{one.headimgurl}}" alt="portrait"></span>
                    <span class="col-xs-7 tel text-left"><i ng-bind="one.nickname"></i> 的{{one.set_alias}}</span>
                </p>

                <p class="row">
                    <span class="col-xs-6 text-center text-info">
                        <i ng-if="one.gpon_status <= 2">{{one.gpon_count}}/{{one.people_limit}}</i>
                        <i ng-if="one.gpon_status == 3">已成团</i>
                        <i ng-if="one.gpon_status == 4">已下单</i>
                        <i ng-if="one.gpon_status == 5">支付完成</i>
                        <i ng-if="one.gpon_status == 22">已过期</i>
                    </span>
                    <span class="col-xs-6 text-center">
                        <button class="btn btn-info"
                                ui-sref="gpon({setid:one.set_id,gponid:one.gpon_id,page:'home'})">查看详情
                        </button>
                    </span>
                </p>
            </div>
        </section>
        <section class="list container mygpon" ng-if="state == 'hotgpon'">
            <div class="boundary row">
                <hr color="#eb5934" size="1">
                <div class="text-center middle">
                    <div class="title center-block">
                        <img src="/Public/Image/1-10.png" alt="">
                        <span class="blk">热团</span>
                    </div>
                </div>
            </div>
            <h4 class="text-center text-info" ng-show="hotlist == null">暂无</h4>

            <div class="onegpon container" ng-repeat="one in hotlist">
                <p class="row">
                    <span class="col-xs-2 portrait text-center"><img ng-src="{{one.headimgurl}}" alt="portrait"></span>
                    <span class="col-xs-7 tel text-left"><i ng-bind="one.nickname"></i> 的{{one.set_alias}}</span>
                </p>

                <p class="row">
                    <span class="col-xs-6 text-center text-info">{{one.gpon_count}}/{{one.people_limit}}</span>
                    <span class="col-xs-6 text-center">
                        <button class="btn btn-info"
                                ui-sref="gpon({setid:one.set_id,gponid:one.gpon_id,page:'home'})">去参团
                        </button>
                    </span>
                </p>
            </div>
        </section>
        <section class="list container mygpon" ng-if="state == 'home'" ng-hide="showuserlist()">
            <div class="boundary row">
                <hr color="#eb5934" size="1">
                <div class="text-center middle">
                    <div class="title center-block">参团伙伴</div>
                </div>
            </div>
            <div class="joinboard container-fuild">
                <div class="addon">
                    <img src="/Public/Image/leader.png" alt="" ng-if="extinfo.user_list != null"/>
                </div>
                <div class="clearfix">
                    <p class="people col-xs-3 text-center" ng-repeat="v in extinfo.user_list">
                        <img data-lazy-src="{{v.headimgurl}}" alt="portrait" src="/Public/Image/11-29.png">
                    </p>
                </div>
            </div>
        </section>
        <section class="links">
            <a class="center-block text-center"
               href="http://mp.weixin.qq.com/s?__biz=MzI2NTA4MzkyOA==&mid=401869550&idx=1&sn=f67aadceb9aafaad2e9c295674cda6ba#rd">
                关注我们，了解更多团购信息
            </a>
        </section>
        <section class="rule container" ng-if="state == 'home'">
            <div class="boundary row">
                <hr color="#eb5934" size="1">
                <div class="text-center middle">
                    <div class="title center-block">购买细则</div>
                </div>
            </div>
            <div class="rulelist">
                <p ng-repeat="rule in rules" ng-bind-html="rule"></p>
            </div>
        </section>
        <section class="extra">
            <img src="/Public/Image/red_logo2.png" alt="">
        </section>
    </article>
    <footer class="navbar navbar-fixed-bottom container" ng-if="state == 'home'">
        <div class="row">
            <div ng-if="extinfo.gpon_status == 22">
                <div class="col-xs-12 text-center">
                    <p class="">该团已过期</p>
                </div>
            </div>
            <div ng-if="extinfo.gpon_status < 22 && extinfo.check_limit_res == false">
                <div class="col-xs-12 text-center">
                    <p class="">已售罄</p>
                </div>
            </div>
            <div ng-if="extinfo.page == 'build_page' && extinfo.gpon_status < 22 && extinfo.check_limit_res == true">
                <div class="col-xs-4 text-center" ng-click="toggleShare()">
                    <p>分享</p>
                </div>
                <button class="btn btn-info col-xs-8 text-center " ng-click="buildGpon()">
                    我要建团
                </button>
            </div>
            <div ng-if="extinfo.page == 'join_page' && extinfo.gpon_status == 1 && extinfo.check_limit_res == true">
                <div class="col-xs-4 text-center" ng-click="buildGpon()">
                    <p>我要建团</p>
                </div>
                <button class="btn btn-info col-xs-8 text-center " ng-click="joinGpon()">
                    我要参团
                </button>
            </div>
            <div ng-if="extinfo.page == 'join_page' && extinfo.gpon_status == 2 && extinfo.check_limit_res == true">
                <div class="col-xs-12 text-center btn btn-info" ng-click="toggleShare()">
                    <button class="glyphicon glyphicon-share ">分享给伙伴，团满即可下单
                    </button>
                </div>
            </div>
            <div ng-if="extinfo.page == 'join_page' && extinfo.gpon_status == 3">
                <button class="btn btn-info col-xs-12 text-center"
                        ui-sref="order({biztype:1,setid:setid,gponid:gponid})">
                    去下单
                </button>
            </div>
            <div ng-if="extinfo.page == 'join_page' && extinfo.gpon_status == 4">
                <button class="btn btn-info col-xs-12 text-center" ui-sref="ordercenter">
                    去付款
                </button>
            </div>
        </div>
    </footer>
    <div class="share_wrap" ng-show="toShare" ng-click="toggleShare()">
        <p class="glyphicon glyphicon-share-alt text-right pull-right"></p>

        <p class="word text-center center-block">点击右上角内分享按钮，分享给好友吧！</p>
    </div>
</div>
